package com.jijuxie.message.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jijuxie.message.domain.Message;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface MessageMapper extends BaseMapper<Message> {

    /**
     * 获取未读消息数
     */
    Integer selectUnreadCount(@Param("userId") Long userId);

    /**
     * 标记所有消息已读
     */
    void updateAllRead(@Param("userId") Long userId);
}
